-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Common source amp with diode connected load #354
base: main
Are you sure you want to change the base?
Common source amp with diode connected load #354
Conversation
Common source amplifier with diode connected load NMOS are used for both input and load devices.
…mplifier_diodeconnectedload
common source amplifier with diode connected load
Thank you for the PR @hirunisilva275 . Please include DRC and LVS reports to confirm the design is clean. |
mtop = multipliers if subckt_only else 1 | ||
model = pdk.models[n_or_p_fet] | ||
|
||
source_netlist = """.subckt {circuit_name} {nodes} """ + f'l={length} w={width} m={mtop} ' + """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to write the spice for the netlist, you can construct it using the sub-devices. Refer to
OpenFASOC/openfasoc/generators/glayout/glayout/flow/blocks/composite/opamp/opamp.py
Line 26 in e7f4611
def opamp_output_stage_netlist(pdk: MappedPDK, output_amp_fet_ref: ComponentReference, biasParams: list) -> Netlist: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay so we need only the pcell for that? I am a bit confused. can you explain further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The common source amp uses subdevices such as nmos. Each of those devices have their own netlists. You can directly connect those netlists using python code to make the netlist for the CS amp. You don't need to write any spice, just instantiate the subdevices in glayout and connect them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is another, probably better example.
|
||
instance_format = "X{name} {nodes} {circuit_name} l={length} w={width} m={mult}" | ||
return Netlist( | ||
circuit_name='CMIRROR', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the component is not cmirror right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I am working on the common source amplifier with diode connected load. I am still working on the DRC and LVS. I will be able to update the PR soon with the new results.
Hello Harsha,
Thank you for the response.
from glayout.flow.routing.straight_route import straight_route
from glayout.flow.routing.c_route import c_route
def csamplifier_diodeconnectedload(pdk: MappedPDK):
csamplifier_diodeconnectedloadComp = Component()
nfet_in = nmos(pdk, with_substrate_tap=False, with_dummy=(False, False))
nfet_load = nmos(pdk, with_substrate_tap=False, with_dummy=(False, True))
cin_ref = csamplifier_diodeconnectedloadComp << nfet_in
cload_ref = csamplifier_diodeconnectedloadComp << nfet_load
cin_ref.movex(evaluate_bbox(nfet_load)[0] + pdk.util_max_metal_seperation
())
csamplifier_diodeconnectedloadComp << c_route(pdk, cload_ref.ports[
"multiplier_0_gate_W"], cload_ref.ports["multiplier_0_drain_W"])
#csamplifier_diodeconnectedloadComp << straight_route(pdk,
cin_ref.ports["multiplier_0_gate_E"],
cload_ref.ports["multiplier_0_gate_E"])
csamplifier_diodeconnectedloadComp << c_route(pdk, cin_ref.ports[
"multiplier_0_drain_E"], cload_ref.ports["multiplier_0_source_E"])
return csamplifier_diodeconnectedloadComp
csamplifier_diodeconnectedload(sky130).write_gds(
"csamplifier_diodeconnectedload.gds")
display_gds("csamplifier_diodeconnectedload.gds", scale=5)
So I can do like this and then do the DRC?
Best Regards,
*Nimasha Hiruni Silva*
Graduate Research Assistant
Florida International University
…On Thu, Dec 12, 2024 at 1:53 PM Harsh Khandeparkar ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
openfasoc/generators/glayout/glayout/flow/blocks/composite/commonsourceampwithdiodeconnctedload/commonsourceamp_diodeconnectedload.py
<#354 (comment)>:
> +def csamplifier_diodeconnectedload_netlist(
+ pdk: MappedPDK,
+ width: float,
+ length: float,
+ multipliers: int,
+ n_or_p_fet: Optional[str] = 'nfet',
+ subckt_only: Optional[bool] = False
+ ) -> Netlist:
+ if length is None:
+ length = pdk.get_grule('poly')['min_width']
+ if width is None:
+ width = 3
+ mtop = multipliers if subckt_only else 1
+ model = pdk.models[n_or_p_fet]
+
+ source_netlist = """.subckt {circuit_name} {nodes} """ + f'l={length} w={width} m={mtop} ' + """
This
<https://github.com/idea-fasoc/OpenFASOC/blob/e7f461123dd9e95216ac9cd59f057c8922fe47de/openfasoc/generators/glayout/glayout/flow/blocks/composite/diffpair_cmirror_bias/diff_pair_cmirrorbias.py#L41-L61>
is another, probably better example.
—
Reply to this email directly, view it on GitHub
<#354 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKIR2VRRIUQUXKKK5JIFSM32FHLTJAVCNFSM6AAAAABSMMFAFGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMBQGUZDQNJQGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sorry for the late reply, but can you elaborate your question? |
Common source amp with diode connected load